<template>
  <div class="recommend">
    <p class="title">热销推荐</p>
    <div class="content" v-for="(v,i ) in recommendList" :key="i">
      <img :src="v.imgUrl">
      <div class="text">
        <h3>{{v.title}}</h3>
        <p>{{v.desc}}</p>
        <button>查看详情</button>
      </div>
    </div>
    <button>查看所有产品</button>
  </div>
</template>
<script>
export default {
  name: "recommend",
  data() {
    return {};
  },
  props: ["recommendList"]
};
</script>

<style scoped>
.recommend {
  margin-top: 0.2rem;
}
.title {
  background-color: #ccc;
  padding: 0.2rem;
}
.content {
  padding: 0.1rem;
  display: flex;
  flex-direction: row;
  border-bottom: 1px solid #ccc;
}
.content img {
  width: 1.6rem;
  height: 1.6rem;
}
.text {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  margin-left: 0.2rem;
}
.text h3 {
  font-weight: bold;
}
.text p {
  color: #666;
}
.text button {
  background-color:darkorange;
  width: 1.6rem;
  height: 0.4rem;
  border: none;
  border-radius: 5px;
  color: #fff;
  line-height: 0.4rem;
  font-weight: bold
}
.recommend>button{
  width: 100%;
  text-align: center;
  height: 0.4rem;
  background-color: lightseagreen;
  color: #fff;
}
</style>